/*
 * gt_app.c
 *
 *  Created on: Feb 26, 2024
 *      Author: Shaynerain
 */

#include "gt_app.h"
#include "spi.h"
#include "GT5SLAD3BFA.h"

VECFONT_ST vecfont;

unsigned char gt_read_data(unsigned char *sendbuf, unsigned char sendlen, unsigned char *receivebuf, unsigned int receivelen)
{
	HAL_GPIO_WritePin(GT_CS_GPIO_Port, GT_CS_Pin, GPIO_PIN_RESET);
	if(sendlen)
	{
		HAL_SPI_Transmit(&hspi1, sendbuf, sendlen, 1000);
	}
	if(receivelen)
	{
		HAL_SPI_Receive(&hspi1, receivebuf, receivelen, 1000);
	}
	HAL_GPIO_WritePin(GT_CS_GPIO_Port, GT_CS_Pin, GPIO_PIN_SET);

	return 1;
}

int gt_init(void)
{
	vecfont.size = 20;
	vecfont.thick = 2;
	vecfont.type = VEC_BLACK_STY;
	return GT_Font_Init();
}

void gt_get_font(unsigned long code, uint16_t size)
{

}


